Repository navigation
fix(server): conversation summaries name the peer who spoke - #131
Merged
Merged
Conversation
|
A seat model's reply is still handed to the summarizer as the user, and to assisted learning as the assistant. These tests require a peer role that carries the speaker. Co-authored-by: Cursor <cursoragent@cursor.com>
The summarizer was given a peer reply as the user, so a seat model's proposal could be stored as the user's decision. Summary input now carries a peer role, and the prompt attributes those words to the speaker by name. Grok 4.7 through Cursor. Co-authored-by: Cursor <cursoragent@cursor.com>
The leaf grader treats any Postgres mention as Astra's proposal, and it misses a user who agrees or an agent who proposes it. Co-authored-by: Cursor <cursoragent@cursor.com>
An open choice that names Postgres was graded as Astra's proposal. A user who agrees or chooses Postgres, and an agent who proposes it, now fail on their own. Co-authored-by: Cursor <cursoragent@cursor.com>
…e user's The knowledge prompt names the peer twice in parentheses and tells the model to put that name in a fact that has to stand alone. Co-authored-by: Cursor <cursoragent@cursor.com>
A saved fact has to stand alone, so the knowledge rule no longer asks for the peer's name. The source line names that peer once. Co-authored-by: Cursor <cursoragent@cursor.com>
Ordering that read by ordinal makes SQLite walk every item in the thread, even when the caller already named the messages. Co-authored-by: Cursor <cursoragent@cursor.com>
The rows land in a map keyed by message. Sorting them by ordinal made SQLite walk every item in the thread instead of the message index. Co-authored-by: Cursor <cursoragent@cursor.com>
The summary request widened every row to an optional speaker, and the prompt type rejected that. Co-authored-by: Cursor <cursoragent@cursor.com>
Corroboration counted a peer's reply and the seat's own copy in its seat thread as independent evidence, so a peer proposal could be saved as a decision with no user citation. Decisions now need user support. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
t3_knowledge_read_source presented a peer reply as the thread's assistant. ProjectKnowledgeSource now carries an optional speaker, attached in knowledge.readSources, and summary expansion reuses it instead of a second lookup. The speaker query moves onto ProjectionStoreV2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A seat without a label falls back to its model, so labels and prompts rendered "gpt-x (gpt-x)". Also drops the exact-wording prompt and label tests; the conversation-summaries eval covers wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The leaf grader failed open statements such as "the user has yet to decide" and passed wrong ones such as "the user went with Postgres". The patterns now need the user or agent to be the subject of an affirmative verb, and catch "per the user". Every reviewed sentence is a row. Adds a knowledge-candidates case where a peer proposes and no decision may come out, with a plain-convention control, and gives the peer case its real source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--arm main, peer-as-user, no-rule and full reproduce each way a peer reply has reached the model, from one checkout. A morph-* model calls Morph directly with the production prompt builders and reply decoder, waiting out its per-minute token limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The helper kept only mustNot failures, so a row the attributed rule failed looked green, and the assistant phrasing production wrote was never tried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bare proposal Production wrote "The assistant answered…" for the peer's words, and the grader only knew user and agent. A proposal noun with no subject no longer needs Astra, and words that keep a choice open stop a match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user asked and hedged, so every arm returned nothing. Now Astra proposes Postgres and the agent agrees and starts the migration while the user never accepts. The peer-as-user arm skips knowledge, which never rendered peers so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both views printed the raw role, so a peer source read "assistant". They now use the author label the summary views use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A seat's own thread and its published reply in the parent corroborated each other, so the peer's words were saved as a convention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted learning counted a peer's published reply in the parent and the seat's own thread as two threads, so one speaker corroborated itself. The publication run names its seat thread; both gates now count by it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The peer rules now appear only when a peer message is in the input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On morph-kimik31, naming the peer was enough: the leaf peer case passed 8/8 without the summary rule, and the knowledge case passed 8/8 on main and without the knowledge rule. With no rule left, prompts without a peer match main and the conditional and its test go too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the prompt rules gone, no-rule equals full, and a knowledge prompt without a peer is main's, so neither knowledge case guards this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In a group conversation, a seat model's reply is a peer's words. Production summaries said "The assistant answered…" for them, crediting the thread's own agent, because the peer reached the summarizer as a nameless assistant message. Assisted learning read the same messages and could save a peer's proposal as a fact.
What changed
peerrole with{ label, model }, printed as[M2] peer Astra (gpt-6-astra):. A seat named by its model is named once. No prompt rule was added: the eval below showed none helped, so prompts for threads without peers are byte-identical tomain.decisiononly with a user citation. Corroboration now counts a seat's own thread and the replies it published into the parent as one source (the publication run names its seat thread), so a peer cannot corroborate itself into aconventionorconstraint.ProjectKnowledgeSourceand summary sources gain an optionalspeaker.t3_knowledge_read_source,t3_conversation_summary_expand, and the web, desktop and mobile source labels (summaries and knowledge) readAstra (gpt-6-astra).ProjectionStoreV2.getPeerSpeakersseeks the message or type index, which a query-plan test pins. Summary verification still pays one speaker read, now insidereadSources.Scope
Verification
evals/conversation-summaries, 8 samples per case onmorph-kimik31through Morph's free API.mainsends the peer as a nameless assistant,peer-as-userrenders it as handoff history does,no-rulenamed the peer without the prompt rules,fullnamed it with them.mainpeer-as-userno-rulefullmainreproduces the production failure: "The assistant first recommended dropping Redis and using Postgres for sessions". Naming the peer fixes it.no-rulepassed 8/8 likefull. Knowledge peer rule: cut, since the knowledge case passed 8/8 onmainandno-rule. The knowledge cases and theno-rulearm were then removed, since without a rule they guard nothing this PR changes.assistantas well asuserandagentas the subject, and every review sentence is a row graded through the full leaf grade. Regexes still miss paraphrase, so read the statements too.gpt-6-lunaandmorph-dsv41flashnumbers on this PR were scored by a grader later found to pass the production failure, so they prove nothing.vp run check:changedpasses (244 tests in 9 files, typecheck of 37 packages).🤖 Generated with Claude Code